package com.beuth.taskList.model;

public enum Priority {
	_1 ("1"),
	_2 ("2"),
	_3 ("3"),
	_4 ("4"),
	_5 ("5"),
	_6 ("6"),
	_7 ("7"),
	_8 ("8"),
	_9 ("9"),
	_10 ("10");
	
	
	String label;
	
	private Priority(String label) {
		this.label = label;
	}
	
	public String toString() {
		return label;
	}
	
	public static Priority getFromString(String value) {
        if(value == null)
            throw new IllegalArgumentException();
        for(Priority prio : values())
            if(value.equalsIgnoreCase(prio.label)) return prio;
        throw new IllegalArgumentException();
    }
};
